package study;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

/**
 * @Auther: hzk  list去重测试
 * @Date: 2024/10/24 09:55
 * @Description: StreamDis
 * @Version 1.0.0
 */
public class StreamDis {

    public static void main(String[] args) {
        List<String> list = Arrays.asList("nihao","haode","ganma");
        List<String> list1 = Arrays.asList("nihao","haod","ganm");
        List<String> dis = list.stream().filter(list1::contains).collect(Collectors.toList());
        System.out.println(dis);

    }
}
